package com.warski.wonderfires.net;

/**
 * Created by Administrator on 2018/12/4.
 */

public enum JsonStep {

    // 获取设备状态
    DeviceStatus("{\"type\":\"device\",\"command\":\"query\"}"),
    // 设定WIFI
    WifiSet("{\"type\":\"device\",\"command\":\"wifi\",\"ssid\":\"xxxx\",\"password\":\"xxx\"}"),
    // 关闭设备
    DeviceClose("{\"type\":\"device\",\"command\":\"close\"}"),
    // 恢复设备默认设置
    DeviceReset("{\"type\":\"device\",\"command\":\"reset\"}"),
    // 打开LED
    LedOpen("{\"type\":\"led\",\"command\":\"open\"}"),
    // 关闭LED
    LedClose("{\"type\":\"led\",\"command\":\"close\"}"),
    // 获取LED开关状态
    LedStatus("{\"type\":\"led\",\"command\":\"status\"}"),
    // 设定LED颜色
    LedColorFormatSet("{\"type\":\"led\",\"command\":\"color\",\"color\":\"%s\"}"),
    // 设定LED模式
    LedModelFormatSet("{\"type\":\"led\",\"command\":\"model\",\"data\":\"%s\",\"length\":\"%s\",\"speed\":\"%s\"}"),
    // 设定LED定时
    LedScheduleFormatSet("{\"type\":\"led\",\"command\":\"schedule\",\"task\":\"%s\",\"time\":%d}"),
    // 查询LED定时任务
    LedQuerySchedule("{\"type\":\"led\",\"command\":\"schedule\",\"task\":\"query\"}"),
    // 清除LED定时任务
    LedCleanSchedule("{\"type\":\"led\",\"command\":\"schedule\",\"task\":\"clean\"}"),
    // 打开火焰
    FireOpen("{\"type\":\"fire\",\"command\":\"open\"}"),
    // 关闭火焰
    FireClose("{\"type\":\"fire\",\"command\":\"close\"}"),
    // 获取火焰状态
    FireStatus("{\"type\":\"fire\",\"command\":\"status\"}"),
    // 设定火焰档位
    FireColorFormatSet("{\"type\":\"fire\",\"command\":\"brightness\",\"color\":\"%d\"}"),
    // 同步显示设备火焰档位
    FireLevelSet("{\"type\":\"fire\",\"command\":\"manual\"}"),
    // 退出火舞模式并保持最小火焰
    FireLevelMinSet("{\"type\":\"fire\",\"command\":\"keep\"}"),
    // 设定火焰定时
    FireScheduleFormatSet("{\"type\":\"fire\",\"command\": \"schedule\",\"task\":\"%s\",\"time\":%d}"),
    // 查询火焰定时任务
    FireQuerySchedule("{\"type\":\"fire\",\"command\": \"schedule\",\"task\":\"query\"}"),
    // 清除火焰定时任务
    FireCleanSchedule("{\"type\":\"fire\",\"command\": \"schedule\",\"task\":\"clean\"}"),
    ;

    private static String value;
    private static String status;
    private String jsonString;

    JsonStep(String jsonString) {
        this.jsonString = jsonString;
    }

    public static String getValue() {
        return value;
    }

    public static void setValue(String value) {
        JsonStep.value = value;
    }

    public static String getStatus() {
        return status;
    }

    public static void setStatus(String status) {
        JsonStep.status = status;
    }

    public String getJsonString() {
        return jsonString;
    }
}
